-- GENERATED SPELL FOR [Feral Defender] --


function spell0_34035(pUnit, Event) --@Feral Essence,Self--
pUnit:FullCastSpellOnTarget(64455,pUnit)
pUnit:RegisterEvent('Sorts_34035', 606, 1)
end

function spell1_34035(pUnit, Event) --@Feral Pounce,n/a--
pUnit:FullCastSpellOnTarget(64478,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34035', 4000, 1)
end

function spell2_34035(pUnit, Event) --@Feral Pounce,n/a--
pUnit:FullCastSpellOnTarget(64669,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34035', 5000, 1)
end

function Sorts_34035(pUnit, Event)
local choix_sorts_34035 = math.random(0, 2)
if choix_sorts_34035 == 0 then
pUnit:RegisterEvent('spell0_34035', 1, 1)
end
if choix_sorts_34035 == 1 then
pUnit:RegisterEvent('spell1_34035', 1, 1)
end
if choix_sorts_34035 == 2 then
pUnit:RegisterEvent('spell2_34035', 1, 1)
end
end

function mob34035_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_34035', math.random(1500, 3000), 1)
end

function mob34035_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34035_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34035_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(34035, 1, 'mob34035_Action')
RegisterUnitEvent(34035, 2, 'mob34035_Leave')
RegisterUnitEvent(34035, 3, 'mob34035_Kill')
RegisterUnitEvent(34035, 4, 'mob34035_Die')
